import {GET} from "@/api/network";

export module Api {
    export module Image {
        
        export interface GetUploadTokenRequest {
            zone:string
        }
        
        export interface GetUploadTokenResponse {
            bucket:string
            key:string
            token:string
            url:string
        }

        export function GetUploadToken(ask:GetUploadTokenRequest) : Promise<GetUploadTokenResponse> {
            return GET(
                `/image/upload/${ask.zone}`
            )
        }
    }
}

export default Api.Image